import { Skeleton, Spin } from 'antd'
import React, { FC, Suspense } from 'react'
import { Provider } from 'react-redux'
import { BrowserRouter, Routes, useRoutes } from 'react-router-dom'

import { routes } from './routes'
import store from './store'
const RoutesComponents = () => {
  const element = useRoutes(routes)
  return <>{element}</>
}

const App: FC = () => {
  return (
    <Provider store={store}>
      <BrowserRouter>
        <RoutesComponents />
      </BrowserRouter>
    </Provider>
  )
}

export default App
